    <script>
    $(document).ready(function() {
      $("#blockCreditTable").tablesorter({
        sortList: [[1,0]],
        textExtraction: function(node) {
          var attr = $(node).attr('data-sort-value');
          if (typeof attr !== 'undefined' && attr !== false) {
            return attr;
          }
          return $(node).text(); 
        } 
      });
    });
    </script>
    {% if credits %}
    <div class="col-lg-12">
      <div class="bs-example table-responsive">
        <table class="table table-striped table-hover tablesorter" id="blockCreditTable">
          <thead>
            <tr>
              <th>{{ _("ID") }}</th>
              <th>{{ _("Time") }}</th>
              <th>{{ _("Dest Currency") }}</th>
              <th>{{ _("Mined") }}</th>
              <th>{{ _("Donation + Fee Amt (d%%/f%%)") }}</th>
              <th>{{ _("Total credited") }}</th>
              <th>{{ _("Status") }}</th>
              <th>{{ _("Block details") }}</th>
            </tr>
          </thead>
          <tbody>
            {% for credit in credits %}
              <tr>
                <td>{{ "{:,}".format(credit.id) }}</td>
                <td data-sort-value="{{ credit.block.found_at }}">{{ credit.block.found_at | human_date_utc }}</td>
                <td>{{ credit.currency }}</td>
                <td title="{{ credit.mined }}">{{ credit.mined | sig_round(2) }} {{ credit.block.currency }} ({{ credit.block.algo }})</td>
                <td data-sort-value="{{ credit.cut_perc }}">{{ credit.text_perc_applied }} {{ credit.block.currency }} ({{ '{:,}'.format(credit.hr_pd_perc) }}%/{{ '{:,}'.format(credit.hr_fee_perc) }}%)</td>
                <td title="{{ credit.amount }}">{{ credit.amount | sig_round(2) }} {{ credit.block.currency }}</td>
                <td>{{ credit.status | safe }}</td>
                {# <td><a href="/block/{{ credit.block.hash }}"># {{ '{:,}'.format(credit.block.height) }}</a></td> #}
                <td><a href="/block/{{ credit.block.hash }}">{{ credit.block.currency }}# {{ '{:,}'.format(credit.block.height) }}</a></td>
              </tr>
            {% endfor %}

          </tbody>
        </table>
      </div>
    </div>
    {% else %}
    <div class="text-center"><h3>{{ _("No credits for this user yet") }}</h3></div>
    {% endif %}
